//
// Created by wze-zero on 2024/9/13 013.
//
#include <iostream>
#include <cmath>

using namespace std;

int test(int num) {
    int sum = 0,n=num;
    while (n != 0) {
        sum += pow(n % 10, 3);
        n /= 10;
    }
    if (num == sum) {
        return num;
    } else {
        return -1;
    }
}

int main() {
    int num1, num2;
    bool flag= false;
    while (cin >> num1 >> num2) {
        for (int i = num1; i < num2 + 1; ++i) {
            if (test(i) != -1) {
                cout << test(i)<<" ";
                flag= true;
            }
        }
        if (!flag){
            cout << "no" << endl;
        }
    }
    return 0;
}